package com.codingman.springdemo2;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo2 {

	public static void main(String[] args) {
		BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext.xml");
		
		Student student2 = (Student) factory.getBean("bean21");
		student2.show();
		
		Student student3 = (Student) factory.getBean("bean22");
		student3.show();
		
		Student student4 = (Student) factory.getBean("bean23");
		student4.show();
		
	}

}
